package org.obs.utils;

import org.obs.core.Draft;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.mail.javamail.JavaMailSenderImpl;

@Draft
public class EmailSender {
	
	public void send(String to, String subject, String body) {
		JavaMailSenderImpl sender = new JavaMailSenderImpl();
		sender.setHost("localhost");
		SimpleMailMessage message = new SimpleMailMessage();
		message.setFrom("good@peoples.su");
		message.setTo(to);
		message.setSubject(subject);
		message.setText(body);
		
		sender.send(message);
	}
}
